home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / virus / tbav609.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1993-12-06  |  10KB  |  304 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo        --- Thunderbyte Anti-Virus installation batch program ---
  5. echo.
  6.  
  7. rem     * Make sure that we can find the utilities in the current directory
  8. if not exist TBSCAN.EXE goto error1
  9.  
  10. rem     * Find out if we are upgrading a previous version in the current dir
  11. if exist TBSTART.BAT goto pathexists
  12.  
  13. rem     * Make sure that the user specified a destination path
  14. if %1X==X goto error2
  15.  
  16. rem     * Make sure the target path exists or can be created
  17. if exist %1\nul goto pathexists
  18. md %1
  19. if not exist %1\nul goto error3
  20. :pathexists
  21.  
  22. rem     * Make sure user did not type something like 'C:' :-)
  23. if exist %1\CONFIG.SYS goto error5
  24.  
  25. echo Please read the License.Doc file. By using the TBAV package you
  26. echo agree with our license agreement. You can print the License.Doc
  27. echo file by typing the following command on the DOS command line:
  28. echo    Copy License.Doc Lpt1
  29. echo Press Ctrl-C to abort this installation batch file, or
  30. pause
  31.  
  32. echo.
  33. echo This installation batch file of the shareware version of TBAV
  34. echo is not the same as the full featured installation program of the
  35. echo commercial version of TBAV. (The main reason for the omission of
  36. echo the installation program is to save disk space and to minimize
  37. echo download time). Therefore the installation procedure might
  38. echo differ from the procedure described in the manual.
  39. echo.
  40.  
  41. rem     * Copy the TBAV utilities if necessary
  42. if exist dummy.tst del dummy.tst >nul
  43. if exist %1\dummy.tst del %1\dummy.tst >nul
  44. echo TEST >%1\dummy.tst
  45. if exist dummy.tst goto filesexists
  46. if not exist %1\dummy.tst goto error4
  47. attrib -h %1\anti-vir.dat >nul
  48. echo Copying files. Please wait...
  49. copy *.* %1 >nul
  50. :filesexists
  51. del %1\dummy.tst >nul
  52. if not exist %1\docs.exe goto nopack
  53. %1\docs -o %1
  54. del %1\docs.exe >nul
  55. :nopack
  56.  
  57. rem     * DOS has no interactive batch file commands,
  58. rem     * so we create a special program to solve that!
  59. rem     * the 'garbage' in the echo command is program code
  60. rem     * to read a key into an errorlevel, the program code
  61. rem     * will be copied into an executable file.
  62. echo ═êα╧┤L═! >%1\ask.com
  63.  
  64. echo.
  65. echo TbSetup will now generate or update the Anti-Vir.Dat file
  66. echo of the directory %1
  67. pause
  68. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  69. %1\TBSETUP %1
  70.  
  71. cls
  72. rem     * do not overwrite an existing TBAV setup.
  73. if exist %1\TBSTART.BAT goto upgrade
  74.  
  75. echo.
  76. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  77. echo directory. It is recommended to read the documentation of TBAV thoroughly
  78. echo and to make a customized setup. One of the advantages of the Thunderbyte
  79. echo Anti-Virus utilities is flexibility and the possibility to configure
  80. echo them to suit your needs in an optimal way.
  81. echo.
  82. echo This installation batch file helps you to setup the utilities in their
  83. echo most standard and non-customized way.
  84. echo Do you want to continue? (Y/n)
  85. %1\ask
  86. if not errorlevel 1 goto nosetup
  87.  
  88. rem     * make a backup of the AUTOEXEC.BAT file!
  89. echo.
  90. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  91. copy c:\autoexec.bat c:\autoexec.org >nul
  92.  
  93. rem     * create a TBSTART.BAT file in the TBAV directory.
  94. echo @echo off >%1\TBSTART.BAT
  95. echo echo off >>%1\TBSTART.BAT
  96.  
  97. echo.
  98. echo For easy access of the TBAV utilities it is recommended to put them
  99. echo into your PATH environment variable.
  100. echo Do you want to add %1 to your PATH statement? (Y/n)
  101. %1\ask
  102. if not errorlevel 1 goto dosetup
  103. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  104. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  105.  
  106. :dosetup
  107. echo.
  108. echo TbSetup will now process the C:\ drive to generate the Anti-Vir.Dat files.
  109. echo You may need to repeat this process for other drives.
  110. pause
  111. rem     * process the rest of the machine, but do not touch existing information!
  112. %1\TbSetup NewOnly C:\
  113.  
  114. :tbdriver
  115. cls
  116. echo.
  117. echo The TBAV package contains some utilities that can be installed in the memory
  118. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  119. %1\ask
  120. if not errorlevel 1 goto autoscan
  121. rem     * create a TBSTART.BAT file in the TBAV directory.
  122. echo %1\TbDriver >>%1\TBSTART.BAT
  123.  
  124. echo.
  125. echo TBSCANX is a memory resident virus scanner.
  126. echo Do you want to install it? (Y/n)
  127. %1\ask
  128. if not errorlevel 1 goto tbcheck
  129. rem     * add the TbScanX statement to the TBSTART.BAT file.
  130. echo %1\TbScanX EMS XMS >>%1\TBSTART.BAT
  131.  
  132. :tbcheck
  133. echo.
  134. echo TBCHECK is a memory resident integrity checker.
  135. echo Do you want to install it? (Y/n)
  136. %1\ask
  137. if not errorlevel 1 goto tbmem
  138. rem     * add the TbCheck statement to the TBSTART.BAT file.
  139. echo %1\TbCheck >>%1\TBSTART.BAT
  140.  
  141. :tbmem
  142. echo.
  143. echo TBMEM is a resident memory guard.
  144. echo Do you want to install it? (Y/n)
  145. %1\ask
  146. if not errorlevel 1 goto tbfile
  147. rem     * add the TbMem statement to the TBSTART.BAT file.
  148. echo %1\TbMem >>%1\TBSTART.BAT
  149.  
  150. :tbfile
  151. echo.
  152. echo TBFILE is a resident file guard.
  153. echo Do you want to install it? (Y/n)
  154. %1\ask
  155. if not errorlevel 1 goto autoscan
  156. rem     * add the TbFile statement to the TBSTART.BAT file.
  157. echo %1\TbFile >>%1\TBSTART.BAT
  158.  
  159. :autoscan
  160. echo.
  161. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  162. %1\ask
  163. if not errorlevel 1 goto addcall
  164. rem     * add the TbScan statement to the TBSTART.BAT file.
  165. echo %1\TbScan Once C:\ >>%1\TBSTART.BAT
  166.  
  167. :addcall
  168. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  169. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  170. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  171. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  172. del C:\TEMP.BAT >nul
  173. del C:\TEMP2.BAT >nul
  174.  
  175. :ready
  176. echo.
  177. echo Do you want to scan the C:\ disk now? (Y/n)
  178. %1\ask
  179. if not errorlevel 1 goto starttbav
  180. %1\TbScan C:\
  181.  
  182. :starttbav
  183. cls
  184. echo.
  185. echo TbSetup has been used to setup disk C:\. If your system has additional
  186. echo disk partitions, you have to use TBSETUP on your other partitions as
  187. echo well. Consult the documentation for more information!
  188. :nosetup
  189. echo.
  190. echo It is highly recommended to print the TBAV user manual.
  191. echo You can do this with the following DOS command:
  192. echo    Copy TBAV.DOC Lpt1
  193. echo.
  194. echo If you are upgrading from previous TBAV versions, it is recommended
  195. echo to print the WHATSNEW files and the Addendum.Doc.
  196. echo You can do this with the following DOS command:
  197. echo    Copy WHATSNEW.* Lpt1
  198. echo    Copy ADDENDUM.DOC Lpt1
  199. echo.
  200. echo The menu program TBAV.EXE can be used to read the documentation files.
  201. echo Do you want to start TBAV now? (Y/n)
  202. %1\ask
  203. if not errorlevel 1 goto end
  204. %1\TBAV
  205. goto end
  206.  
  207. :upgrade
  208. echo.
  209. rem     * Delete all stuff we don't support anymore
  210. echo Install.Bat will delete some obsolete files from previous TBAV
  211. echo versions which are not supported anymore.
  212. echo.
  213. if exist %1\TbScan.Com del %1\TbScan.Com >nul
  214. if exist %1\TbScan.Msg del %1\TbScan.Msg >nul
  215. if exist %1\*.Hlp del %1\*.Hlp >nul
  216. if exist %1\VirScan.Dat del %1\VirScan.Dat >nul
  217. if exist %1\AddnSigs.Dat del %1\AddnSigs.Dat >nul
  218. if exist %1\ComprSca.* del %1\ComprSca.* >nul
  219. if exist %1\*.AVR del %1\*.AVR >nul
  220. if exist %1\MTE.Doc del %1\MTE.Doc >nul
  221. if exist %1\Washburn.Doc del %1\Washburn.Doc >nul
  222. if exist %1\TbScanX.Com del %1\TbScanX.Com >nul
  223. if exist %1\TbRescue.* del %1\TbRescue.* >nul
  224. if exist %1\TBAV.CFG del %1\TBAV.CFG >nul
  225. if exist %1\TbShell.* del %1\TbShell.* >nul
  226. if exist %1\register.exe ren %1\register.exe reg.exe
  227. if exist %1\register.* del %1\register.* >nul
  228. if exist %1\reg.exe ren %1\reg.exe register.exe
  229. if exist %1\TbGarble.* del %1\TbGarble.* >nul
  230. if exist %1\GetBoot.* del %1\GetBoot.* >nul
  231. if exist %1\Intro.Doc del %1\Intro.Doc >nul
  232. if exist %1\TbSetup.Doc del %1\TbSetup.Doc >nul
  233. if exist %1\TbUtil.Doc del %1\TbUtil.Doc >nul
  234. if exist %1\TbScan.Doc del %1\TbScan.Doc >nul
  235. if exist %1\TbClean.Doc del %1\TbClean.Doc >nul
  236. if exist %1\StackMan.Doc del %1\StackMan.Doc >nul
  237. if exist %1\TbGensig.Doc del %1\TbGensig.Doc >nul
  238. if exist %1\TbDriver.Doc del %1\TbDriver.Doc >nul
  239. if exist %1\TbScanX.Doc del %1\TbScanX.Doc >nul
  240. if exist %1\TbCheck.Doc del %1\TbCheck.Doc >nul
  241. if exist %1\TbMem.Doc del %1\TbMem.Doc >nul
  242. if exist %1\TbFile.Doc del %1\TbFile.Doc >nul
  243. if exist %1\TbDisk.Doc del %1\TbDisk.Doc >nul
  244. if exist %1\TbDel.Doc del %1\TbDel.Doc >nul
  245. if exist %1\Upgrade.Bat del %1\Upgrade.Bat >nul
  246. if exist %1\TBAV.ICO del %1\TBAV.ICO >nul
  247. if exist %1\TBAV.PIF del %1\TBAV.PIF >nul
  248. echo All obsolete TBAV files have been removed.
  249. echo.
  250. if not exist %1\StackMan.Exe goto ready
  251. echo Note: StackMan.Exe is not necessary anymore to solve TBAV problems.
  252. echo StackMan is therefor no longer supplied with the shareware TBAV package.
  253. echo If you do not use StackMan, you can delete it from the TBAV directory.
  254. goto ready
  255.  
  256. :error1
  257. echo Error: Invalid program invocation!
  258. echo.
  259. echo Make sure that you invoke INSTALL.BAT in the directory where the
  260. echo TBAV utilities can be found!
  261. echo.
  262. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  263. echo A: [enter]
  264. echo INSTALL [path] [enter]
  265. goto end
  266.  
  267. :error2
  268. echo Error: No destination path specified!
  269. echo.
  270. echo You have to specify the destination path for the TBAV utilities!
  271. echo Even if the utilities are already in the destination path.
  272. echo.
  273. echo Example:
  274. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  275. echo INSTALL C:\TBAV
  276. goto end
  277.  
  278. :error3
  279. echo Error: Unable to creat destination directory %1
  280. echo.
  281. echo Make sure you enter an existing destination path or a path that can be created!
  282. goto end
  283.  
  284. :error4
  285. echo Error: Unable to copy files in directory %1
  286. echo.
  287. echo Disk full? Access denied?
  288. goto end
  289.  
  290. :error5
  291. echo Error: No target directory specified!
  292. echo.
  293. echo Make sure you enter a full destination path!
  294. echo %1 is not sufficient!
  295. echo.
  296. echo Example:
  297. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  298. echo INSTALL C:\TBAV
  299. goto end
  300.  
  301. :end
  302. if exist %1\ask.com del %1\ask.com >nul
  303.  
  304.